import type { AdminInfoFilterResult, UserInfo } from "@/types/authority/accountEditing.d";
import request from "@/utils/request";

export const getAdminInfo = (params: Object) => {
    return request<AdminInfoFilterResult>({
        url: "authority/admin_user/detail",
        method: "get",
        params
    });
};
export const getMineInfo = () => {
    return request<{ item: UserInfo }>({
        url: "authority/admin_user/mine_detail",
        method: "get"
    });
};
export const getShopInfo = () => {
    return request<{ item: any }>({
        url: "merchant/shop/current_detail",
        method: "get"
    });
};
export const adminInfoSubmit = (data: object) => {
    return request({
        url: "authority/admin_user/modify_manage_accounts",
        method: "post",
        data
    });
};
//获取手机验证码
export const getAdminCode = (params: object) => {
    return request({
        url: "authority/admin_user/get_code",
        method: "get",
        params
    });
};
//验证手机验证码
export const setAdminCode = (data: object) => {
    return request({
        url: "adminapi/admin_user/check_code",
        method: "post",
        data
    });
};
